package com.zxl.openapi.config;


import com.zxl.openapi.listener.MyContextLoadListener;

import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.amqp.core.Queue;


@Configuration
public class ZuulConfig {

    @Bean
    public ServletListenerRegistrationBean servletListenerRegistrationBean(MyContextLoadListener myContextLoadListener){

        ServletListenerRegistrationBean servletListenerRegistrationBean = new ServletListenerRegistrationBean();

        servletListenerRegistrationBean.setListener(myContextLoadListener);

        return servletListenerRegistrationBean;

    }

    @Bean
    public Queue queue(){

        return new Queue("suibianbigemingzi");

    }

}
